package com.shop.merchant.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.merchant.po.GoodsBase;
import com.shop.po.dto.GoodsInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author banxia
 * @since 2023-02-24
 */
//@Mapper
public interface GoodsBaseMapper extends BaseMapper<GoodsBase> {


    List<GoodsInfo> getGoodsList(@Param("likeName") String likeName,
                                 @Param("minPrice") Long minPrice,
                                 @Param("maxPrice") Long maxPrice,
                                 @Param("categoryName") String categoryName,
                                 @Param("merchantId") Long merchantId,
                                 @Param("page") Integer page,
                                 @Param("size") Integer size);

    int goodsCountUpdate(@Param("goodsId") Long goodsId, @Param("count") Long count);

    public Long UserGetTotal(@Param("likeName") String likeName,
                      @Param("minPrice") Long minPrice,
                      @Param("maxPrice") Long maxPrice,
                      @Param("categoryName") String categoryName);

}
